<template>
	<view class="policy-desc-layout">
		<view class="policy-desc-box" v-for="(item,index) in dataList" :key="index">
			<text>{{item.title}}</text>
			<text>{{item.content}}</text>
		</view>
		<xh-empty :show="dataList.length == 0"></xh-empty>
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	const props = defineProps(['data'])
	console.log(props.data)
	const dataList = JSON.parse(decodeURIComponent(props.data || '[]'))
	
</script>

<style lang="scss" scoped>
	.policy-desc-layout {
		padding: 30rpx;

		.policy-desc-box {
			background-color: #fff;
			padding: 30rpx;
			border-radius: 20rpx;
			display: flex;
			flex-direction: column;
			margin-bottom: 20rpx;

			text:nth-child(1) {
				color: $xh-red-color;
			}

			text:nth-child(2) {
				font-size: 26rpx;
				color: $xh-color-6;
				margin-top: 16rpx;
			}
		}
	}
</style>